﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace ComparativeSheet
{
    public partial class CompareLists : Form
    {
        public CompareLists()
        {
            InitializeComponent();
        }
        public CompareLists(Int32? outDocId, Int32? inDocId)
        {
            _inDocId = inDocId;
            _outDocId = outDocId;
            InitializeComponent();
        } 
        Int32? _outDocId = null;
        Int32? _inDocId = null;
        DataSets.CSData.DocLinesDataTable _data1 = null;
        DataSets.CSData.DocLinesDataTable _data2 = null;
        DataSets.CSDataTableAdapters.DocLinesTableAdapter _adapter = new ComparativeSheet.DataSets.CSDataTableAdapters.DocLinesTableAdapter();
       

        private void CompareLists_Load(object sender, EventArgs e)
        {
            if (_inDocId.HasValue)
            {
                _data1 = _adapter.GetData(_inDocId.Value);
                dgv1.DataSource = _data1;
            }
            if (_outDocId.HasValue)
            {
                _data2 = _adapter.GetData(_outDocId.Value);
                dgv2.DataSource = _data2;
            }
        }
    }
}